package com.entity.view;

import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.KechengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

import com.utils.DateUtil;

/**
 * 课程信息
 * 后端返回视图实体辅助类
 * （通常后端关联的表或者自定义的字段需要返回使用）
 */
@TableName("kecheng")
public class KechengView extends KechengEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    //当前表
    /**
     * 课程类型的值
     */
    @ColumnInfo(comment = "课程类型的字典表值", type = "varchar(200)")
    private String kechengValue;
    /**
     * 班级的值
     */
    @ColumnInfo(comment = "班级的字典表值", type = "varchar(200)")
    private String banjiValue;

    public String getStudentValue() {
        return studentValue;
    }

    public void setStudentValue(String studentValue) {
        this.studentValue = studentValue;
    }

    public String getSignValue() {
        return signValue;
    }

    public void setSignValue(String signValue) {
        this.signValue = signValue;
    }

    @ColumnInfo(comment = "123", type = "varchar(100)")
    private String signValue;
    @ColumnInfo(comment = "123", type = "varchar(1000)")
    private String studentValue;
    //级联表 教师
    /**
     * 教师姓名
     */

    @ColumnInfo(comment = "教师姓名", type = "varchar(200)")
    private String jiaoshiName;
    /**
     * 教师头像
     */

    @ColumnInfo(comment = "教师头像", type = "varchar(200)")
    private String jiaoshiPhoto;
    /**
     * 身份证号
     */

    @ColumnInfo(comment = "身份证号", type = "varchar(200)")
    private String jiaoshiIdNumber;
    /**
     * 联系方式
     */

    @ColumnInfo(comment = "联系方式", type = "varchar(200)")
    private String jiaoshiPhone;
    /**
     * 电子邮箱
     */

    @ColumnInfo(comment = "电子邮箱", type = "varchar(200)")
    private String jiaoshiEmail;
    /**
     * 逻辑删除
     */

    @ColumnInfo(comment = "逻辑删除", type = "int(11)")
    private Integer jiaoshiDelete;

    public Integer getSign() {
        return sign;
    }

    public void setSign(Integer sign) {
        if (sign == null) this.sign = 0;
        else
            this.sign = sign;
    }

    @ColumnInfo(comment = "是否签到", type = "int(11)")
    private Integer sign;

    public KechengView() {

    }

    public KechengView(KechengEntity kechengEntity) {
        try {
            BeanUtils.copyProperties(this, kechengEntity);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }


    //当前表的

    /**
     * 获取： 课程类型的值
     */
    public String getKechengValue() {
        return kechengValue;
    }

    /**
     * 设置： 课程类型的值
     */
    public void setKechengValue(String kechengValue) {
        this.kechengValue = kechengValue;
    }
    //当前表的

    /**
     * 获取： 班级的值
     */
    public String getBanjiValue() {
        return banjiValue;
    }

    /**
     * 设置： 班级的值
     */
    public void setBanjiValue(String banjiValue) {
        this.banjiValue = banjiValue;
    }


    //级联表的get和set 教师

    /**
     * 获取： 教师姓名
     */
    public String getJiaoshiName() {
        return jiaoshiName;
    }

    /**
     * 设置： 教师姓名
     */
    public void setJiaoshiName(String jiaoshiName) {
        this.jiaoshiName = jiaoshiName;
    }

    /**
     * 获取： 教师头像
     */
    public String getJiaoshiPhoto() {
        return jiaoshiPhoto;
    }

    /**
     * 设置： 教师头像
     */
    public void setJiaoshiPhoto(String jiaoshiPhoto) {
        this.jiaoshiPhoto = jiaoshiPhoto;
    }

    /**
     * 获取： 身份证号
     */
    public String getJiaoshiIdNumber() {
        return jiaoshiIdNumber;
    }

    /**
     * 设置： 身份证号
     */
    public void setJiaoshiIdNumber(String jiaoshiIdNumber) {
        this.jiaoshiIdNumber = jiaoshiIdNumber;
    }

    /**
     * 获取： 联系方式
     */
    public String getJiaoshiPhone() {
        return jiaoshiPhone;
    }

    /**
     * 设置： 联系方式
     */
    public void setJiaoshiPhone(String jiaoshiPhone) {
        this.jiaoshiPhone = jiaoshiPhone;
    }

    /**
     * 获取： 电子邮箱
     */
    public String getJiaoshiEmail() {
        return jiaoshiEmail;
    }

    /**
     * 设置： 电子邮箱
     */
    public void setJiaoshiEmail(String jiaoshiEmail) {
        this.jiaoshiEmail = jiaoshiEmail;
    }

    /**
     * 获取： 逻辑删除
     */
    public Integer getJiaoshiDelete() {
        return jiaoshiDelete;
    }

    /**
     * 设置： 逻辑删除
     */
    public void setJiaoshiDelete(Integer jiaoshiDelete) {
        this.jiaoshiDelete = jiaoshiDelete;
    }


    @Override
    public String toString() {
        return "KechengView{" +
                ", kechengValue=" + kechengValue +
                ", banjiValue=" + banjiValue +
                ", jiaoshiName=" + jiaoshiName +
                ", jiaoshiPhoto=" + jiaoshiPhoto +
                ", jiaoshiIdNumber=" + jiaoshiIdNumber +
                ", jiaoshiPhone=" + jiaoshiPhone +
                ", jiaoshiEmail=" + jiaoshiEmail +
                ", jiaoshiDelete=" + jiaoshiDelete +
                "} " + super.toString();
    }
}
